{include file="header.html"}
<script type="text/javascript" src="index.php?act=jslang"></script>
<script src="{lib file=jquery.plugins/additional-methods.js}" charset="utf-8"></script>
<script type="text/javascript">
//<!CDATA[
$(function(){
    $('#rent_form').validate({
        errorPlacement: function(error, element){
            $(element).next('.field_notice').hide();
            $(element).after(error);
        },
        success : function(label){
            label.addClass('right').text('OK!');
        },
        onkeyup    : false,
        rules : {
            rent_no : {
                required : true,
                remote : {
                    url  : 'index.php?app=o2orent&act=check_rent_no',
                    type : 'get',
                    data : {
                        rent_no : function(){
                            return $('#rent_no').val();
                        },
                        id : '{$rent.rent_id}'
                    }
                }
            },
            floor: {
                required: true
            },
            tel: {
                isPhone: true
            }
        },
        messages : {
            rent_no: {
                required: '出租位不能为空',
                remote: '出租位已被占用'
            },
            floor: {
                required: '楼层不能为空'
            },
            tel:{
                isPhone: '电话号码格式不正确'
            }
        }
    });
});
//]]>
</script>

<div id="rightTop">
  <p>出租管理</p>
  <ul class="subnav">
    <li><a class="btn1" href="index.php?app=o2orent">{$lang.manage}</a></li>
    {if $act eq "edit"}
    <li><span>{$lang.edit}</span></li>
    {else}
    <li><span>{$lang.add}</span></li>
    {/if}
  </ul>
</div>
<div class="info">
  <form method="post" enctype="multipart/form-data" id="rent_form">
    <table class="infoTable">
      <tr>
        <th class="paddingT15">出租位:</th>
        <td class="paddingT15 ">
            <input class="infoTableInput2" name="rent_no" type="text" id="rent_no" value="{$rent.rent_no|escape}" />
            <span style="color: gray">有多个铺号，请用英文","号分割开，如:1A301,1A302</span>
        </td>
      </tr>
        <tr>
        <th class="paddingT15">所在楼层:</th>
        <td class="paddingT15 ">
            <select name="floor">
                <option value="">请选择--</option>
                {html_options options=$floors selected=$rent.floor}
            </select>
        </td>
      </tr>
      <tr>
        <th class="paddingT15">出租面积:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="area" type="text" id="area" value="{$rent.area|escape}" /></td>
      </tr>
      <tr>
        <th class="paddingT15">联系人:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="link_man" type="text" id="link_man" value="{if $rent.link_man}{$rent.link_man|escape}{else}徐经理{/if}" /></td>
      </tr>
      <tr>
        <th class="paddingT15"> 电话:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="tel" type="text" id="tel" value="{if $rent.tel}{$rent.tel}{else}020-83280088{/if}"/>        </td>
      </tr>
        <tr>
        <th class="paddingT15">月租:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="monthly" type="text" id="monthly" value="{$rent.monthly}"/></td>
      </tr>
        <tr>
        <th class="paddingT15">月租单价:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="monthly_unit" type="text" id="monthly_unit" value="{$rent.monthly_unit}"/></td>
      </tr>
        <tr>
        <th class="paddingT15">月管理费:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="manage_fee" type="text" id="manage_fee" value="{$rent.manage_fee}"/></td>
      </tr>
        <tr>
        <th class="paddingT15">月管理费单价:</th>
        <td class="paddingT15 "><input class="infoTableInput2" name="manage_unit" type="text" id="manage_unit" value="{$rent.manage_unit}"/></td>
      </tr>
      <tr>
            <th class="paddingT15">
                出租位图片:</th>
            <td class="paddingT15 wordSpacing5">
                    <input class="infoTableFile" id="image_url" type="file" name="image_url" />
                    {if $rent.image_url}<img src="{$site_url}/{$rent.image_url}" width="50" height="50">{/if}
            </td>
        </tr>
      <tr id="tr_remark">
          <th class="paddingT15" valign="top">备注:</th>
          <td class="paddingT15 "><label for="remark"></label>
              <textarea name="remark" id="remark">{$rent.remark}</textarea></td>
      </tr>
      <tr>
        <th></th>
        <td class="ptb20"><input class="formbtn" type="submit" name="Submit" value="{$lang.submit}" />
          <input class="formbtn" type="reset" name="Reset" value="{$lang.reset}" /></td>
      </tr>
    </table>
  </form>
</div>
{include file="footer.html"}